﻿using System;
using System.Collections.Generic;
using System.Text;
using Common.Utilities;

namespace Workflows.Components.TextMining.Clustering
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class DocumentTokenizationInstruction
    {
        #region props
        private string _StopWordListName;
        /// <summary>
        /// the name used to retrieve file stored in embedded resource
        /// the file is a text file that each line contains a stop word
        /// </summary>
        public string StopWordListName
        {
            get
            {
                return this._StopWordListName;
            }
            set
            {
                this._StopWordListName = value;
            }
        }

        private AbstractWorker _TokenizationWorker;
        /// <summary></summary>
        public AbstractWorker TokenizationWorker
        {
            get
            {
                return this._TokenizationWorker;
            }
            set
            {
                this._TokenizationWorker = value;
            }
        }

        private AbstractWorker _LemmatizationWorker;
        /// <summary></summary>
        public AbstractWorker LemmatizationWorker
        {
            get
            {
                return this._LemmatizationWorker;
            }
            set
            {
                this._LemmatizationWorker = value;
            }
        }

        private int _TokenOccuranceThreshold;
        /// <summary></summary>
        public int TokenOccuranceThreshold
        {
            get
            {
                return this._TokenOccuranceThreshold;
            }
            set
            {
                this._TokenOccuranceThreshold = value;
            }
        }

        private string _DocListFilePath;
        /// <summary>
        /// an xml file containing doc id and file path mappings
        /// <Docs>
        ///     <Doc DocID="0" FilePath=""></Doc>
        /// </Docs>
        /// </summary>
        public string DocListFilePath
        {
            get
            {
                return this._DocListFilePath;
            }
            set
            {
                this._DocListFilePath = value;
            }
        }

        private string _TermListFilePath;
        /// <summary>
        /// Output file path containing list of tokens
        /// <Terms>
        ///     <Term TermID="0" Phrase=""/>
        /// </Terms>
        /// </summary>
        public string TermListFilePath
        {
            get
            {
                return this._TermListFilePath;
            }
            set
            {
                this._TermListFilePath = value;
            }
        }

        private string _TokenizationOutputFilePath;
        /// <summary>
        /// an xml file containing frequency of terms in each document
        /// <Output>
        ///     <Terms>
        ///         <Term TermID="1" TotalOccurance="1">
        ///             <Doc DocID="0" TokenFrequency="1"/>
        ///         </Term>
        ///     </Terms>
        ///     <Docs>
        ///         <Doc DocID="0" DistinctTokenCount="12" AllTokenCount="12"/>
        ///     </Docs>
        /// </Output>
        /// </summary>
        public string TokenizationOutputFilePath
        {
            get
            {
                return this._TokenizationOutputFilePath;
            }
            set
            {
                this._TokenizationOutputFilePath = value;
            }
        }
        #endregion
    }
}
